/* eslint-disable @typescript-eslint/no-explicit-any */
// import React from 'react'

import { Navigate } from "react-router-dom"

function Hoc_Login(Com: any) {
    return () => {
        const token = localStorage.getItem('token')
        if (token) {
            return <Com />
        } else {
            return <Navigate to='/login'></Navigate>
        }
    }
}

export default Hoc_Login
